package com.flyduck.system.vo.role.trans;


import cn.hutool.core.bean.BeanUtil;
import com.flyduck.system.entity.SysRoleEntity;
import com.flyduck.system.vo.role.SysRoleSelectRespVO;
import com.google.common.base.Function;


/**
 * @program: flyduck-platform
 * @description:
 * @author: flyduck
 * @create: 2021-02-01 12:42
 **/
public class SysRoleEntiyToSysRoleSelectRespVO implements Function<SysRoleEntity, SysRoleSelectRespVO> {

    @Override
    public SysRoleSelectRespVO apply(SysRoleEntity sysRoleEntity) {
        SysRoleSelectRespVO sysRoleSelectRespVO = new SysRoleSelectRespVO();
        BeanUtil.copyProperties(sysRoleEntity,sysRoleSelectRespVO);
        sysRoleSelectRespVO.setId(sysRoleEntity.getId()+"");
        return sysRoleSelectRespVO;
    }
}
